﻿using System;
using System.Data;
using System.Configuration;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using Coolite.Ext.Web;
/// <summary>
///Err 的摘要说明
/// </summary>
public class Err
{
	public Err()
	{
		//
		//TODO: 在此处添加构造函数逻辑
		//
	}
    public static void Warning(string msg,MessageBox.Icon icon) {
        string title = "";
        switch (icon)
        {
            case MessageBox.Icon.ERROR:
                title = "错误";
                break;
            case MessageBox.Icon.INFO:
                title = "信息";
                break;
            case MessageBox.Icon.NONE:
                title = "提示";
                break;
            case MessageBox.Icon.QUESTION:
                title = "问题";
                break;
            case MessageBox.Icon.WARNING:
                title = "警告";
                break;
            default: break;
        }
        Ext.MessageBox.Show(new MessageBox.Config
        {
            Buttons = MessageBox.Button.OK,
            Icon = icon,
            Title = title,
            Message = msg,
            Width = 300
        });
    }
}
